<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('teacher/index')}">查询教师</a></li>
        <li class="active"><a href="{:url('teacher/add_teacher')}">添加教师</a></li>
    </ul>
    <form action="{:url('teacher/add_teacher_Post')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-6">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">姓名<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text" name="name"
                                   id="name" required="required" value="{$param['name']|default=''}" placeholder="请输入姓名"/>
                        </td>
                    </tr>
                    <tr>
                        <th>联系方式<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text" required="required" name="phone" id="phone" value="{$param['phone']|default=''}" placeholder="请输入联系方式">
                        </td>
                    </tr>
					<tr>
                        <th>身份证号码</th>
                        <td><input class="form-control" type="text" name="IDcard" id="IDcard" value=""
                                   placeholder="请输入身份证号码"></td>
                    </tr>
                </table>
            </div>
            <div class="col-md-6">
                <table class="table table-bordered">
				
                    <tr>
                        <th><b>生日</b></th>
                        <td>
                            <input class="form-control js-bootstrap-date" type="text" name="birthday"
                                   value="">
                        </td>
                    </tr>
					<tr>
                        <th><b>入职时间</b></th>
                        <td>
                            <input class="form-control js-bootstrap-date" type="text" name="entry_time"
                                   value="">
                        </td>
                    </tr>
					<tr>
                        <th><b>性别</b></th>
                        <td>
							<input class="btn btn-default" style="width:39%;margin:0 5% 0 5%" id="man" type="button" value="男" />
							<input class="btn btn-default" style="width:39%;margin:0 5% 0 5%" id="woman" type="button"  value="女" />
						</td>
						<input type="hidden" name="sex" value="{$param['sex']|default=''}" />
                    </tr>
                </table>
            </div>
			<div class="col-md-12">
				<table class="table table-bordered">
					<tr>
                        <th>教师介绍</th>
                        <td>
                            <script type="text/plain" id="content" name="introduction"></script>
                        </td>
                    </tr>
                    <tr>
                        <th>备注</th>
                        <td>
                            <input class="form-control" name="note" style="height: 50px;" placeholder="请填写备注信息"></input>
                        </td>
                    </tr>
				</table>
				<div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
                        <input class="btn btn-primary" type="button" value="返回" onclick="javascript:history.back(-1)"></input>
                    </div>
                </div>
			</div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">

	$(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }

        $('.btn-cancel-thumbnail').click(function () {
            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail').val('');
        });

    });

	$(function(){
		$("#man").click(function(){
			$("#man").prop("class","col-xs-4 col-sm-6 btn btn-success");
			$("#woman").prop("class","col-xs-4 col-sm-6 btn btn-default");
			$("input[name='sex']").val('1');
		});
		$("#woman").click(function(){
			$("#woman").prop("class","col-xs-4 col-sm-6 btn btn-success");
			$("#man").prop("class","col-xs-4 col-sm-6 btn btn-default");
			$("input[name='sex']").val('2');
		});
	});
</script>
</body>
</html>
